package com.ruoyi.member.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 积分记录对象 member_points_log
 * 
 * @author ruoyi
 */
public class MemberPointsLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long logId;

    /** 会员ID */
    @NotNull(message = "会员ID不能为空")
    @Excel(name = "会员ID")
    private Long memberId;

    /** 变动积分 */
    @NotNull(message = "变动积分不能为空")
    @Excel(name = "变动积分")
    private Integer points;

    /** 类型（1增加 2减少） */
    @NotBlank(message = "变动类型不能为空")
    @Excel(name = "变动类型", readConverterExp = "1=增加,2=减少")
    private String type;

    /** 变动项目 */
    @NotBlank(message = "变动项目不能为空")
    @Size(min = 0, max = 50, message = "变动项目长度不能超过50个字符")
    @Excel(name = "变动项目")
    private String title;

    /** 描述 */
    @Size(min = 0, max = 500, message = "描述长度不能超过500个字符")
    @Excel(name = "描述")
    private String description;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Integer getPoints() {
        return points;
    }

    public void setPoints(Integer points) {
        this.points = points;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("logId", getLogId())
            .append("memberId", getMemberId())
            .append("points", getPoints())
            .append("type", getType())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("operator", getOperator())
            .append("createTime", getCreateTime())
            .toString();
    }
} 